package study.saas.order.entity;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import study.saas.common.viewmodel.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @author zxx
 */
@Data
@Entity
@Table(name = "orders",indexes = {
        @Index(name = "userName_index",columnList = "userName")
})
@ApiModel
public class Orders extends BaseEntity {

    @Column
    @ApiModelProperty(value = "订单ID")
    private Integer OrderId;

    @Column
    @ApiModelProperty(value = "用户名")
    private String userName;

    @Column
    @ApiModelProperty(value = "商品名")
    private String commodityName;

    @Column
    @ApiModelProperty(value = "商品数量")
    private Integer amount;

    @Column
    @ApiModelProperty(value = "商品金额")
    private BigDecimal price;

    @Column
    @ApiModelProperty(value = "商品总金额")
    private BigDecimal totalPrice;
}
